package cn.dyp.com.agriculture.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;

import cn.dyp.com.agriculture.ClientApp;

/**
 * 取消标题栏
 * 获取获取Application（ClientApp）实例
 * Created by lenovo on 2017/5/7.
 */

public class BaseActivity extends AppCompatActivity {

    protected ClientApp mApp;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getSupportActionBar() != null){
            getSupportActionBar().hide();
        }
        mApp = (ClientApp) getApplication();//获取Application实例，只在Activity和Service中才能调用
        mApp.setActivity(this);
    }
}
